Spindle Orientation on the Norte Vertical Milling Center is a special case.
The spindle motor has an encoder.
So at first we tried to use this encoder.
This was lost time because we have a timing belt between the spindle servo motor and the spindle with a ratio of 0.7.
So, what had Norte GmbH taken as provisions for tool orientation.
The have assembled a pneumatic cilinder and two proximity switches on the side of the spindle and a pin blocks the spindle.
Unfortunately we discovered the cause WHY formerly the tool changer was unreliable with Sinumerik 3.
It had nothing to do with the controller, but with the indexing cilinder.
The cilindric hardened pin of the pneumatic cilinder was 2.5mm offset of the locking bore on the spindle.
So every once it indexed it was not securely locked.
This caused, unfortunately, a lot of damage to the pockets of the tool changer, which need to be repaired fully (sigh).
We amended this fault with a spacer.
After some "try and error" we landed with this little pgm.
It locks now in all cases on the right position.

#10.The O01.ngc to this date (25-05-2013)
-----------------------------------------
( LinuxCNC 25-05-2013)
(ToolChange T01 Beta Version)
M05
G53 G01 Z-74.85 F5000.0
G53 G01 Y-10.0 F5000.0
S30 M03
G4 P1 (wait a sec)
M64 P2
(G4 P3)
M66 P0 L4 Q7(wait up to 7 seconds for digital input 0 to turn on in wait mode 4)
M05
G4 P1 (wait a sec)
M65 P2
M2


(motion.digital-in-00- These pins 00 01 02 03 or more if configured)
(are controlled by M62-M65)
(motion.digital-out-00 These pins 00 01 02 03 or more if configured)
(are controlled by M62-M65)
(example: M64 P0 (turn on digital out pin 0)

(M62 P- - turn on digital output synchronized with motion.)
(The P- word specifies the digital output number.)

(M63 P- - turn off digital output synchronized with motion.)
(The P- word specifies the digital output number.)

(M64 P- - turn on digital output immediately.)
(The P- word specifies the digital output number.)

(M65 P- - turn off digital output immediately.)
(The P- word specifies the digital output number.)

(M66 WAIT ON INPUT Example Lines)
(M66 P0 L3 Q5 wait up to 5 seconds for digital input 0 to turn on in wait mode L3)

(Wait Mode 0: IMMEDIATE - no waiting, returns immediately.)
(The current value of the input is stored in parameter #5399)
(Wait Mode 1: RISE - waits for the selected input to perform a rise event.)
(Wait Mode 2: FALL - waits for the selected input to perform a fall event.)
(Wait Mode 3: HIGH - waits for the selected input to go to the HIGH state.)
(Wait Mode 4: LOW - waits for the selected input to go to the LOW state.)